package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.entity.BiddEntity;
import com.project.entity.SupplierEntity;
import com.project.entity.UserEntity;
import com.project.entity.UserRecordEntity;
import com.project.service.IBiddService;
import com.project.service.ISupplierService;
import com.project.service.IUserService;
import com.project.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("bidd")
public class BiddController {

    @Autowired
    private IBiddService biddService;

    @Autowired
    private ISupplierService supplierService;

    /**
     *查找所有供应商
     */
    @RequestMapping("findAllSupplier")
    public List<SupplierEntity> findAllSupplier() {
        return supplierService.findAllSupplier();
    }


    /**
     *确认发布,发布招标书
     */

    @RequestMapping("release")
    public ResultVo release(String inviteId, long [] supplierRefArray , String biddTitle ) {

        biddService.release(inviteId, supplierRefArray, biddTitle);

             ResultVo resultVo = new ResultVo();
        resultVo.setSuccess(true);
        return resultVo;
    }


}
